<template>
	<view class="box">
		<view class="register mb24">
			<navbar :title="i18n.wdtd"></navbar>
		</view>
		
		<view class="grade mt25 fsb">
			<view class="fcsf pl40">
				<view class="whitecolor f16 mt20 mb10">{{userCount}}</view>
				<view class="f12 mar-auto white opacity05">{{i18n.xqyj}}</view>
			</view>
			<view class="fcsf pr40">
				<view class="whitecolor f16 mt20 mb10">
						{{yj}}
				</view>
				<view class="f12 mar-auto white opacity05">
					{{i18n.dqyj}}
				</view>
			</view>
		</view>
		<!-- <view class="profitdetal" v-if="list.length>0"> -->
		<view class="profitdetal">
			<view class="describe">
				<view class="bluetitle">
					
				</view>
				<view class="title f16 white">
					{{i18n.ztyj}}
				</view>
			</view>
		</view>
		<view>
			<null v-if="list.length<=0"></null>
			<view class="teambox fsc mt20" v-for="(titem,tindex) in list" v-if="list.length>0" :key="tindex">
				<view class="fcs">
					<image :src="titem.avatar" mode="" class="mgr8 headImg"></image>
					<view class="fcsf">
						<view class="name f15 white">
							{{titem.walletName}}
						</view>
						<view class="tel f12 textcolor mt5">
							{{i18n.dengj}}：{{titem.levelName}}
						</view>
					</view>
				</view>
			
				<view class="xiadan fcsf">
					
					<view class="fcsf align-right">
						<view class="f15 white ">
							{{titem.teamYj}}
						</view>
						<view class="xiadantext textcolor f12 mt5 ">
							团队业绩(USDT)
						</view>
					</view>
				</view>
			</view>
			
		</view>
		<!-- <view class="teambox fsc mgt24" v-for="(item,index) in list" :key="index">
			<view class="fcs">
				<image :src="item.avatar" mode="" class="mgr8"></image>
				<view class="fcsf">
					<view class="name f14 f600">
						{{item.nikeName}}
					</view>
					<view class="tel f12 grcolor mgt10">
						{{item.phone | hide}}
					</view>
				</view>
			</view>
		
			<view class="xiadan fcsf">
				<view class="xiadantext grcolor f12">
					下单金额
				</view>
				<view class="price fsc mgt10">
					<view class="f16 f600">
						{{item.price}} 
					</view>
					<view class="f12 f600">
						元
					</view>
				</view>
			</view>
		</view>
		
		
		<view v-if="list.length==0" class="mt80">
			<image src="../../static/nodata.png" class="nodata"></image>
			<view class="text-c notxt mgt20">暂无团队成员相关信息</view>
		</view> -->
	</view>
</template>

<script>
	
	export default{
		data(){
			return{
				yj:"",
				userCount:"",
				list:[],
				tel:""
			}
		},
		onLoad() {
			
		},
		computed: {
			i18n() {
				return this.$t('user');
			}
		},
		onShow() {
			this.$http.post("user.getTeamInfo").then(res=>{
				this.yj=res.data.bigYj
				this.userCount=res.data.smallYj
				this.list=res.data.driverUserList
			})
			// this.search()
		},
		filters:{
					hide(data){
					var str="***"+data.substring(3)
					return str
					}
		},
		methods:{
			search(){
				// console.log(this.tel)
				this.$http.post("user.getLastUserList",{phone:this.tel}).then(res=>{
					this.list=res.data.records
				})
			},
			gotoMy() {
				uni.reLaunch({
					url: './my'
				});
			}
		}
	}
</script>

<style lang="less">
	.box{
		// padding: 0 18rpx;
		margin-top: 0;
		// color: #FFFFFF;
		.title{
			
			font-family: STSongti, STSongti-Bold;
			text-align: left;
		}
		.grade{
			width: 100%;
			// height: 90rpx;
			background-image: url(../../static/mybanner.png);
			background-size: cover;
			background-repeat: no-repeat;
			margin-left: auto;
			margin-right: auto;
			// padding: 70rpx 100rpx 70rpx 126rpx;
			.copy{
				width: 24rpx;
				height: 24rpx;
			}
		}
		.profitdetal{
			margin-top: 20rpx;
			.describe{
				display: flex;
				justify-content: flex-start;
				align-items: center;
				margin-top: 40rpx;
				margin-bottom: 40rpx;
				.bluetitle{
					width: 4rpx;
					height: 32rpx;
					opacity: 1;
					background: #308ae4;
					margin-right: 20rpx;
				}
			}
		}
		.search{
			width: 690rpx;
			height: 68rpx;
			margin-left: 14rpx;
			opacity: 1;
			background: #f2f3f5;
			border-radius: 10rpx;
			
			text-align: center;
			color: #9E9E9E;
			font-size: 26rpx;
		}
		.searchicon{
			position: absolute;
			top:35%;
			left: 40%;
			width: 24rpx;
			height: 24rpx       ;
		}
		.teambox{
			width: 100%;
			padding-bottom: 40rpx;
			border-bottom: 2rpx solid #1C2D41;
		}
	}
	
	.register {
		.back {
			justify-content: center;
			align-items: center;
			display: flex;
			font-size: 34rpx;
			margin-left: 30rpx;
			position: relative;
			.leftarrow {
				position: absolute;
				left: 0;
				top: 0;
				width: 32rpx;
				height: 32rpx;
			}
		}
		.chrecord {
			position: absolute;
			top: 0;
			right: 0;
			margin-right: 30rpx;
			color:#586471;
		}
	}
	.mar-auto{
		margin: 0px auto 20px auto;
	}
	.opacity05{
		opacity: 0.5;
	}
	.headImg{
		width: 42px;
		height: 42px;
	}
	.textcolor{
		color:#586471;
	}
	.align-right{
		align-items: self-end;
	}
</style>
